package com.groupbuying.admin.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.stereotype.Service;

/**
 * @author ywxd
 */
@Service
public interface TokenService {
    /**
     * 根据用户id生成token持久化
     */
    @SentinelResource(value = "testSentinel")
    String testSentinel();

    String createToken(Long userId);

    Long getUserIdByToken(String token);

    boolean removeToken(String token);
}
